<form class="form-horizontal" name="form1" ng-submit="onSubmit(form1)">
  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">
      <span aria-hidden="true">&times;</span>
    </button>
    <h4 class="modal-title">
      <i class="fa fa-map-signs text-warning"></i>
      {{'externalPath.add'|translate}}
      <!-- 添加外部路径 -->
    </h4>
  </div>

  <div class="modal-body">

    <div class="form-group" ng-class="{'has-error':!form1.path.$valid}">
      <label class="col-sm-2 control-label" for="path">
        {{'externalPath.path'|translate}}:
        <!-- 名称: -->
      </label>
      <div class="col-sm-8">
        <i class="fa fa-question-circle" style="position: absolute; padding: 10px;" uib-tooltip="{{'externalPath.path.tooltip'|translate}}" tooltip-is-open="form1.path.$invalid" tooltip-placement="top" tooltip-append-to-body="true"></i>
        <input type="text" ng-model="item.path" id="path" autocomplete="off" autofocus name="path" required="required" ng-pattern="reg"
          placeholder="Bucket/Object-Prefix" class="input-md form-control" style="padding-left: 32px;" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-2 control-label" for="region">
        {{'region'|translate}}:
        <!-- 区域: -->
      </label>
      <div class="col-sm-8">
        <select ng-model="item.regionId" ng-options="region.s3Id as region.translatedLabel for region in regions" name="region" required="required"
          class="input-md form-control"></select>
      </div>
    </div>

    <div class="clearfix"></div>
  </div>

  <div class="modal-footer">
    <button type="submit" class="btn btn-success btn-sm">
      <i class="glyphicon glyphicon-ok"></i>
      {{'ok'|translate}}
      <!-- 确定 -->
    </button>
    <button type="button" class="btn btn-default btn-sm" ng-click="cancel()">
      <i class="glyphicon glyphicon-remove"></i>
      {{'cancel'|translate}}
      <!-- 取消 -->
    </button>
  </div>
</form>
